import request from '@/utils/request'

/**
 * @description 验证码
 */
export function captchaApi() {
  return request({
    url: `/captcha`,
    method: 'get'
  })
}

/**
 * @description 用户登录
 * @param data
 * @returns {*}
 */
export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/getAdminInfoByToken',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'get'
  })
}
